import http from '@/api/index'
/* 分页查询 */
export function selectByPage (params) {
  return http.get('/category/list', params)
}
/* 查询全部 */
export function selectAll () {
  return http.get('/category/list?selectAll=' + true)
}
/* 根据 id 查询 */
export function selectById (id) {
  return http.get('/category/' + id)
}
/* 根据 ids 查询 */
export function selectByIds (ids) {
  return http.get('/category?ids=' + ids.toString())
}
/* 新增 */
export function insert (data) {
  return http.post('/category', data)
}
/* 修改 */
export function update (data) {
  return http.put('/category', data)
}
/* 删除 */
export function remove (id) {
  return http.delete('/category/' + id)
}
